<script type="text/javascript">
        //头部topbar会员中心显示与隐藏
         var Account= document.getElementById('account');
                    var Downmenu= document.getElementById('dbox');
                    var timer = null;//定义定时器变量
                    //鼠标移入div1或div2都把定时器关闭了，不让他消失
                    Account.onmouseover = Downmenu.onmouseover = function ()
                    {
                       //改变箭头方向
                       $("i#icount").attr("class","fa fa-angle-down");
                             
                       //改变背景颜色
                       // Account.style.backgroundColor = '#fff';
                       //显示下拉框
                              $("#dbox").show();
                      //关闭定时执行
                              clearTimeout(timer);
                          }
      
                    //鼠标移出div1或div2都重新开定时器，让他延时消失
                    Account.onmouseout = Downmenu.onmouseout = function ()
                    {
                      $("i#icount").attr("class","fa fa-angle-down");
                      // Account.style.backgroundColor = '#F5F5F5';
                       //开定时器，每隔200微妙下拉框消失
                              timer = setTimeout(function () { 
                                  $("#dbox").hide(); }, 200);
                    }
</script>

<script type="text/javascript">
          $.validator.setDefaults({
               submitHandler: function() {
                   alert("提交事件!");
                     }
                 });
                           
          $().ready(function() {
               $("#commentForm").validate({
                    rules:{
                        password:"required",
                        repassword:{
                            equalTo:"#password"
                               }
                          }
                        });
                   });

</script> 